<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2018/9/21
 * Time: 20:13
 */

class student
{
    static $sum=0;
    const isdie=false;
    public $name;
    public $age;
    public $sex;
    function __construct($name)
    {
        student::$sum++;
        $this->name=$name;
        echo "<br>".$name."加入PHP，当前有".student::$sum."个学生<br>";
    }
    function __destruct()
    {
        echo "<br>析构函数";
    }
    function A()
    {
        echo "这是自我介绍".$this->name."<br>".$this->sex."<br>".$this->age;
    }
}